package com.wkk.mapper;

import com.wkk.entity.Card;
import com.wkk.entity.Income;
import com.wkk.entity.SignIn;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface AdminMapper {

    //对收入表进行操作
    List<Income> selectListIncomeByATime(Map<String,Object> map);

    int insertOneIncome(Income income);

    int updateOneIncomeByDateAndType(Income income);

    List<Income> selectListIncome();

    List<Income> selectListIncomeByDate(String date);

    List<Income> selectListIncomeByDateInTypeTotal(String date);

    List<Income> selectListIncomeByType(String type);

    List<Income> selectListIncomeByStartToEndTime(Map<String,Object> map);

    Integer monthIncomeSum(Map<String,Object> map);

    Integer dayIncomeSum(String date);

    //对签到表进行操作
    int insertOneSignIn(SignIn signIn);

    List<SignIn> selectListSignIn();

    List<SignIn> selectListSignInByUid(Integer uid);

    List<SignIn> selectListSignInByDate(String date);

    //对用户表进行操作
        //获取某段时间内新增的会员或用户数量
    Integer getMemberOrUserCountByStartToEndTime(Map<String,Object> map);

    //对朋友圈表进行操作
    Integer getChatCountByStartToEndTime(Map<String,Object> map);


    //对会员卡表进行操作
    Card selectCardByCid(Integer cid);
}
